


	******************************************************************
	**
	**
	**		NAME:	ELITE PERSISTENCE IN THE ERA OF EXPANDING OVERSEAS TRADE
	**
	**		MAKES:  Figures 3 (a) and (b)		       
	**		
	**
	******************************************************************
	
	
	
	
	

			

		
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* global for input/output
*-------------------------------------------------------------------------------


* input
*------

global input = "" 	
	
	
* output
*-------

global output = ""	
		
	
	
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* preliminaries
*-------------------------------------------------------------------------------


* preliminaries
*--------------

clear
set more off





			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* data
*-------------------------------------------------------------------------------



* use
*----

cd ${input}
use analysis_vars_parl.dta, clear




			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* assert
*-------------------------------------------------------------------------------


* assert
*-------

assert 	parl_year >= 1536 & parl_year <= 1760


duplicates tag parl_group, gen(tt)
assert tt == 0 if parl_group != .
drop tt






			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* globals
*-------------------------------------------------------------------------------


* globals
*--------

global yr1 		= "parl_year > 1553 & parl_year < 1639"
global yr2 		= "parl_year >= 1660 & parl_year <= 1756"

global yr3 		= "parl_year >= 1639 & parl_year <= 1649"
global yr4 		= "parl_year >= 1628 & parl_year <= 1660"

global yr5 		= "parl_year < 1639 & parl_year >= 1583"
global yr6 		= "parl_year > 1550 & parl_year <= 1750"

global yr7 		= "parl_year > 1553 & parl_year <= 1640"


global xline1	= "xline(1660, lcolor(gs12))"
global xline2	= "xline(1688, lcolor(gs12) lpattern(line) )"
global xline3	= "xline(1640, lcolor(gs12))"
global xline4	= "xline(1562, lcolor(gs12)  lpattern(line) )"


	
	


			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* plot:  trend in dynastic (FIGURE 4 (a))
*-------------------------------------------------------------------------------


* hi lo
*------

capture drop hi 
capture drop lo
gen hi = 101
gen lo = 40
sort parl_group



* this plot
*----------

global outcome1 = "dynas_all_nation_pperc" 
global scale = "40(20)100"

gen ${outcome1}_pct = ${outcome1} * 100





* plot
*-----

# delimit ;

twoway 
	
	
		// shaded area
	(rarea hi lo parl_year	
		if   ${yr3} 
		,  color(gs12) )
		
		

	(lpoly ${outcome1}_pct parl_year
		if   ${yr1}		
		,  bwidth(8) lcolor(gs1)  lwidth(medthick) lpattern(line)  ${xline2} ${xline4} )
	(lpoly ${outcome1}_pct parl_year
		if   ${yr2}		
		,  bwidth(8) lcolor(gs1)  lwidth(medthick) lpattern(line)  )
		
		
		
		
		
	(scatter ${outcome1}_pct parl_year
		if    ${yr1}		
		,  mcolor(gs1) msize(medlarge) msymbol(circle))
	(scatter ${outcome1}_pct parl_year
		if    ${yr2}			
		,  mcolor(gs1) msize(medlarge) msymbol(circle))		

		
		,
		yscale(noline)
		xscale(noline)
		

		
		xsize(8.5)
		ysize(3)

		title("", color(black) size(medsmall) pos(11) ) 
		xlab(  1550(25)1750, 
			labsize(medsmall) nogrid ) 
		ylab( ${scale}, 
			angle(hori) labsize(medsmall) nogrid  )
		xtitle("Year" , 
			color(black) size(large) )
		ytitle("Percentage of MPs", 
			color(black) size(large)  )
		graphregion( fcolor(white) lcolor(white) ) 
		plotregion( fcolor(white) lstyle(none) lcolor(white) ilstyle(none)) 
		legend(order(
				2 "% MPs w/ Pre-existing Surname"
				)
			cols(3)
			pos(6)
			
			region( color(none) )
			size(large)
			)
		
		;

# delimit cr


	* export graph
	*-------------

	cd "${output}"
	graph export "trend_dynas.pdf", replace
	
	
	
	
	
	
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	


*-------------------------------------------------------------------------------
* plot:  trend in aristocratic mps (FIGURE 4 (b))
*-------------------------------------------------------------------------------


* hi lo
*------

capture drop hi 
capture drop lo
gen hi = 81
gen lo = 0
sort parl_group



* this plot
*----------

global outcome1 = "fam_any_aris_pperc"
global outcome2 = "fam_any_mp_aris_pperc_norm"

gen ${outcome1}_pct = ${outcome1} * 100
gen ${outcome2}_pct = ${outcome2} * 100

global scale = "0(20)80"



* plot
*-----

# delimit ;

twoway 
	
	
		// shaded area
	(rarea hi lo parl_year	
		if   ${yr3} 
		,  color(gs12) )
		
		
		
	(lpoly ${outcome1}_pct parl_year
		if   ${yr1}		
		,  bwidth(8) lcolor(gs1)  lwidth(medthick) lpattern(line) ${xline2} ${xline4}  )
	(lpoly ${outcome1}_pct parl_year
		if   ${yr2}		
		,  bwidth(8) lcolor(gs1)  lwidth(medthick) lpattern(line)  )
		
		
	(lpoly ${outcome2}_pct parl_year
		if   ${yr1}		
		,   bwidth(7) lcolor(gs5)  lwidth(medthick) lpattern(shortdash) yaxis(2))
	(lpoly ${outcome2}_pct parl_year
		if   ${yr2}		
		,   bwidth(7) lcolor(gs5)  lwidth(medthick) lpattern(shortdash) yaxis(2) )	
	

	(scatter ${outcome1}_pct parl_year
		if    ${yr1}		
		,  mcolor(gs1) msize(medlarge) msymbol(cicle))
	(scatter ${outcome1}_pct parl_year
		if    ${yr2}			
		,  mcolor(gs1) msize(medlarge) msymbol(cicle))	
		
	(scatter ${outcome2}_pct parl_year
		if    ${yr1}		
		,  mcolor(gs5) msize(medlarge) msymbol(circle_hollow) yaxis(2) )
	(scatter ${outcome2}_pct parl_year
		if    ${yr2}			
		,  mcolor(gs5) msize(medlarge) msymbol(circle_hollow) yaxis(2) )	
		

		
		,
		yscale(noline axis(1))
		yscale(noline axis(2))
		xscale(noline)

		
		xsize(8.5)
		ysize(3)

		title("", color(black) size(medsmall) pos(11) ) 
		xlab(  1550(25)1750, 
			labsize(medsmall) axis(1) nogrid) 
		ylab( ${scale}, 
			angle(hori) labsize(medsmall) nogrid axis(1) )
		ylab( 0.0(.02).08, 
			angle(hori) labsize(medsmall) nogrid axis(2) )
		xtitle("Year" , 
			color(black) size(large) )
		ytitle("Percentage of MPs", 
			color(black) size(large) axis(1) )
			
		ytitle("Percentage of MPs /" "Size of the Peerage", 
			color(black) size(large) axis(2) )
		graphregion( fcolor(white) lcolor(white) ) 
		plotregion( fcolor(white) lstyle(none) lcolor(white) ilstyle(none)) 
		legend(order(
				2 "% Aristocratic MPs"
				7 "% Aristocratic MPs as a Fraction of All Extant Peerages"
				)
			cols(3)
			pos(6)
			
			region( color(none) )
			size(large)
			)
		
		;

# delimit cr


	* export graph
	*-------------

	cd "${output}"
	graph export "trend_aris.pdf", replace
	
	
	
	
	
	
	
		
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
			**	**	**	**	**	**	**	**	**	**	**	**	**
	

						** end of do file ** 	
	
	
	
	
	
	
